package com.starbooks.tmail.data;

import com.starbooks.tmail.mapper.UserMapper;
import com.starbooks.tmail.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author starbooks
 */
@Service
public class UserService {

  @Autowired
  public void setUserMapper(UserMapper userMapper) {
    this.userMapper = userMapper;
  }

  private UserMapper userMapper;

  public User findUserById(int id){
    return userMapper.findUserById(id);
  }

  public List<User> findUsers(){
    return userMapper.findUsers();
  }

}
